package com.dc;

import java.io.IOException;
import java.io.Reader;

import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;

public class DBUtil {

	public static SqlMapClient getClient() throws IOException {
		String resource = "sqlmap-config-mysql.xml";
		Reader reader = Resources.getResourceAsReader(resource);
		SqlMapClient client = SqlMapClientBuilder.buildSqlMapClient(reader);
		return client;
	}

}
